package com.yellow.routingservice.utils;

import com.yellow.routingservice.service.GeocodingService;
import jakarta.annotation.Resource;
import org.json.JSONException;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @author: hy
 * @create: 2024-05-07
 */
@Component
public class GeocodingUtil {
    @Resource
    private GeocodingService geocodingService;

    public Map<String, Double> getCoordinates(String address) throws JSONException {
        return geocodingService.getCoordinates(address);
    }
}
